﻿<UserControl x:Class="MicroFlasher.Views.Settings.StkV1SettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:settings="clr-namespace:MicroFlasher.Views.Settings"
             xmlns:models="clr-namespace:MicroFlasher.Models"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance models:StkV1Config }">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <settings:ComPortSettingsView DataContext="{Binding Path=ComPortSettings}" />
        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="2*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>

            <Label Grid.Row="0" Grid.Column="0" Target="{Binding ElementName=ResetPin}">Use Reset:</Label>
            <CheckBox Grid.Row="0" Grid.Column="1" IsChecked="{Binding Path=UseReset}" Content=""/>

            <Label Grid.Row="1" Grid.Column="0" Target="{Binding ElementName=ResetPin}">Reset PIN:</Label>
            <ComboBox Grid.Row="1" Grid.Column="1" x:Name="ResetPin"
                  ItemsSource="{StaticResource OuputComPins}" 
                  SelectedItem="{Binding Path=ResetPin.Pin, Mode=TwoWay}" />
            <CheckBox Grid.Row="1" Grid.Column="2" IsChecked="{Binding Path=ResetPin.Invert}" Content="Invert"/>

        </Grid>
    </Grid>
</UserControl>
